package com.dkd.service;

import cn.hutool.db.sql.Order;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dkd.entity.OrderEntity;
import com.dkd.entity.OrderSkuVo;
import com.dkd.entity.vo.OrderPageQuery;
import com.dkd.vo.OrderVO;
import com.dkd.vo.Pager;
import com.dkd.vo.PayVO;
import com.dkd.vo.SkuVO;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

public interface OrderService extends IService<OrderEntity> {
	/**
	 * 通过订单编号获取订单实体
	 * @param orderNo
	 * @return
	 */
	OrderEntity getByOrderNo(String orderNo);
	
	/**
	 * 微信小程序支付创建订单
	 * @param payVO
	 * @return
	 */
	OrderEntity createOrder(PayVO payVO, String platform);
	
	/**
	 * 发送出货通知
	 * @param orderNo
	 * @param skuId
	 * @param innerCode
	 * @return
	 */
	boolean vendout(String orderNo, Long skuId, String innerCode, Integer amount);

	List<Long> getByBId(Long businessId);

	List<OrderSkuVo> getSupplyCount(String innerCode, Date start, Date end);


	Long getAmount(Integer partnerId, String innerCode, LocalDate start, LocalDate end);

	Long getCount(Integer partnerId, String innerCode, LocalDate start, LocalDate end);


	List<OrderSkuVo> getBusinessTop10Skus(Integer topValue, LocalDate start, LocalDate end);
}
